package com.atguigu.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @ClassName : com.atguigu.springcloud.config.ApplicationContextConfig
 * @Description : 类描述
 * Created by cyd on 2021-09-15 19:56:04
 */
@Configuration
public class ApplicationContextConfig {

    /**
     * 将restTemplate注入容器
     */
    @Bean
    @LoadBalanced
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
